class Node:
    def __init__(self,val=0,next=None):
        self.val=val
        self.next=next

class LinkQueue:
    def __init__(self,q_size=0):
        self.head=self.tail=dumy=Node()
        self.size=0
        self.q_size=q_size

    def enter_quequ(self,val):
        self.tail.next = Node(val)
        self.tail = self.tail.next
        if self.size==0:
            self.head=self.tail
        self.size+=1

    def depart_quequ(self):
        result=self.head.val
        self.head=self.head.next
        self.size-=1
        return  result

    def show(self):
        current=self.head
        while current:
            if current.next is None:
                print(current.val,end="\n")
            else:
                print(current.val,end="-->")
            current=current.next


    def is_empty(self):
        return  self.size==0

    def size_of(self):
        count=0
        current=self.head
        while current:
            count+=1
            current=current.next
        return count

    def is_full(self):
        return self.size>=self.q_size

if __name__=="__main__":
    queue=LinkQueue(4)
    print(queue.is_empty())
    queue.enter_quequ(1)
    queue.enter_quequ(2)
    queue.enter_quequ(3)
    queue.enter_quequ(4)
    print(queue.is_full())
    queue.show()
    queue.depart_quequ()
    queue.show()
    queue.depart_quequ()
    queue.show()
    print(queue.is_empty())
